package com.zjc.springboot.nettyserver;

import com.zjc.springboot.nettyserver.server.SocketServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

@SpringBootApplication
public class NettyServerMain implements CommandLineRunner {

    @Resource
    private SocketServer socketServer;

    public static void main(String[] args) {

        SpringApplication.run(NettyServerMain.class, args);
    }

    @Override
    public void run(String... args) {

        socketServer.start();

    }
}
